<template>
   <div class="common-layout">
    <el-container>
      <el-header> <button @click="LogOut()">退出登录</button> </el-header>
      <el-container>
        <el-aside width="200px">Aside</el-aside>
        <el-main>Main</el-main>
      </el-container>
    </el-container>
  </div>
</template>
    
<script setup lang='ts'>
import { useRouter } from 'vue-router';
const router=useRouter()
// 退出登录
function LogOut(){
   router.push('/login')
   localStorage.clear()
}
</script>
    
<style>
.el-header {
    background-color: blue;
}

.el-aside {
    background-color: red;
}
.el-main{
    background-color: yellow;
}
</style>